﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CompilerLib.Scanner.Generator
{

    public class NFAEdge
    {
        /// <summary>
        /// 这里使用int型是不是代表有符号表中的索引
        /// </summary>
        //public int Symbol { get; private set; }
        //public NFAEdge(int symbol, NFAState target)
        //{
        //    Symbol = symbol;
        //    TargetState = target;
        //}
        public char Symbol { get; private set; }
        public NFAEdge(char symbol, NFAState target)
        {
            Symbol = symbol;
            TargetState = target;
        }

        public NFAState TargetState { get; private set; }
        /// <summary>
        /// 边是第一条入边时，边上没有符号
        /// </summary>
        /// <param name="target"></param>
        public NFAEdge(NFAState target)
        {
            Symbol = 'ε';
            TargetState = target;
        }
    }

}
